The invention relates to a method of and a computer system for performing a transaction on a database, wherein a number of transactions are available to be performed on said database, and wherein at least one of said transactions may only be performed if corresponding requirements are fulfilled, wherein the fulfillment of said requirements depends on the prior successful termination of at least one other transaction or on said at least one of said transactions being a first transaction.
The integrity of databases is vital for today""s enterprises. Therefore, database management systems are used to perform and control all accesses to and changes of the database. In order to improve the integrity of a database, so-called semantical integrity rules or requirements are included in the database management system which ensure the compliance of the data in the database with known business rules.
One kind of these rules are so-called dynamic semantical integrity rules or requirements. They ensure that a transition of the database state may only be performed if at least one specific datastate was present in a series of prior database states. Dynamic semantical integrity rules therefore deal with prior database states which relate to successful terminations of prior transactions performed on the database.
For example: The promotion of an employee is only valid if the job code of the employee has been increased some time prior to the promotion. The transaction of promoting the employee may therefore only be performed if the requirement is fulfilled that the prior transaction of increasing the job code of the employee has terminated successfully.
To implement and/or monitor such dynamic semantical integrity rules or requirements, the core of the database management system would have to be modified. Because of the risk of changing a stable system, such a modification is usually avoided.
It is an objective of the invention to provide a method and a computer system which is able to enforce dynamic semantical integrity rules without having the need to change the database management system at its core.
This objective is solved by a method as described above with the following additional steps: said at least one of said transactions is invoked, depending on stored information related to prior successful terminations of transactions it is checked whether said corresponding requirements are fulfilled, if said requirements are fulfilled, said transaction is performed, and after a successful termination of said transaction, an information relating to said successful termination is stored.
Any successful termination of a transaction is stored. This provides the possibility to check whether a specific prior transaction was terminated successfully. Furthermore, specific rules or requirements are assigned to at least some of the provided transactions. These rules relate to the prior successful termination of at least one other transaction. If a transaction is invoked, it is first of all checked which requirements have to be fulfilled to start this transaction i.e. which other transaction or transactions must have terminated successfully before the present transaction can be performed or whether the present transaction is a first transaction which has no predecessors and which therefore must be performed first. Then, for the first mentioned requirements, it is checked whether this or these other prior transactions were actually terminated successfully. If this is the case, the invoked present transaction is performed. If the transaction terminates successfully, this information is stored.
The invention stores all successful terminations of transactions separately. Therefore, it is possible to check the fulfillment of specific requirements with the help of this stored information. No further modification, in particular almost no modification of the database management system is necessary. The invention enables the database management system to enforce the dynamic semantical integrity rules on the basis of the stored information.
It is possible to built a new database management system including dynamic semantical integrity rules and their enforcement according to the invention. However, even more important, it is possible to expand a given database management system by including the dynamic semantical integrity rules and their enforcement afterwards. This may be done with only minor changes in the database management system, in particular with no changes in the core of the database management system.
In an advantageous embodiment of the invention a sequence checker is provided for checking whether said corresponding requirements are fulfilled and for storing said information. The sequence checker is the tool for establishing the information about the prior successfully terminated transactions. It also is used for checking this information i.e. for checking the fulfillment of the dynamic semantical integrity rules or requirements.
It is most advantageous if said sequence checker includes or is a part of or is able to access or is a workflow management system. Such a workflow management system usually provides all features required by the sequence checker. In particular, a workflow management system is able to execute and to store the flow within a process. This ability may be used to execute and store the flow of subsequent successfully terminated prior transactions. Any successfully terminated transaction therefore triggers a transition in the workflow management system from a first node to a second node wherein each of these nodes represent database state transitions.
The workflow management system therefore always includes xe2x80x9can imagexe2x80x9d of the successfully terminated prior transactions performed on the database. As a consequence, the workflow management system is always able to check whether specific requirements relating to the successful termination of prior transactions are fulfilled or not.
The use of a workflow management system has therefore the advantage that dynamic integrity of a database may be achieved very easily. The workflow management system provides all necessary functions to establish the integrity according to the invention.
In an advantageous embodiment of the invention a transaction terminator is provided for creating said information relating to said termination. This transaction terminator is therefore the interface to the sequence checker. The created information is then transferred from the transaction terminator to the sequence checker to be stored there.
It is advantageous if said transaction terminator is a part of or is coupled with a database management system controlling said database. The transaction terminator is therefore the only additional part which has to be added to the database management system. As already mentioned, this part does not impact the core of the database management system at all. Instead, it may be added to the database management system as an additional task or the like.
The transaction terminator and the sequence checker represent interface between the database management system and the workflow management system. They have to be adapted to each other so that they are able to exchange the relevant information. Therefore, the invention may be realized in a very effective manner by the establishment of this interface.
In a further embodiment of the invention, said information is processed as a transition of said database from a first state to a second state. Any successfully terminated transaction has therefore the consequence that the database changes from the first database state into the second database state. This transition is stored in the sequence checker or in the workflow management system due to the received information. The xe2x80x9cimagexe2x80x9d of the database is thereby updated in the sequence checker or in the workflow management system.
In a further embodiment of the invention, the fulfillment of said requirements is checked by examining the present state of the database. The present database state is represented by the xe2x80x9cimagexe2x80x9d of the database stored in the sequence checker or in the workflow management system. On the basis of this xe2x80x9cimagexe2x80x9d, the mentioned fulfillment of requirements is examined.